package com.fang.fen.blog.common.security;

import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

public class PdUtil {

    public static String encode(String str) {
        BCryptPasswordEncoder pe = new BCryptPasswordEncoder();
        return pe.encode(str);
    }

    public static boolean match(String raw, String encoded) {
        BCryptPasswordEncoder pe = new BCryptPasswordEncoder();
        return pe.matches(raw, encoded);
    }
}
